package com.auth.common.result;

import lombok.Getter;
/**
 * @Author Tangjiachang
 * @Description
 * @Date 22:23 2023/7/20
 **/
@Getter
public enum ResultCodeEnum {
    /**
     * @Author Tangjiachang
     * @Description 请求成功返回
     * @Date 15:59 2023/7/20
     **/
    SUCCESS(200, "成功"),
    /**
     * @Author Tangjiachang
     * @Description 请求失败返回
     * @Date 15:59 2023/7/20
     **/
    FAIL(500,"失败"),
    /**
     * @Author Tangjiachang
     * @Description 服务器异常返回
     * @Date 15:59 2023/7/20
     **/
    SERVICE_ERROR(2012, "服务器异常"),
    /**
     * @Author Tangjiachang
     * @Description 数据异常返回
     * @Date 15:59 2023/7/20
     **/
    DATA_ERROR(204, "数据异常"),
    /**
     * @Author Tangjiachang
     * @Description 未登录返回
     * @Date 16:00 2023/7/20
     **/
    LOGIN_AUTH(208, "未登录"),
    /**
     * @Author Tangjiachang
     * @Description 没有权限返回
     * @Date 16:00 2023/7/20
     **/
    PERMISSION(401, "没有权限"),
    /**
     * @Author Tangjiachang
     * @Description 认证失败返回
     * @Date 16:00 2023/7/20
     **/
    LOGIN_FAIL(210, "认证失败");

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
